<template>
    <div>
    <el-table :data="store.getters['member/getMember'].memberList" border style="width: 100%" class="tab">
        <el-table-column prop="id" label="用户编号" width="180">
            </el-table-column>
            <el-table-column prop="nickname" label="昵称" width="180">
            </el-table-column>
            <el-table-column prop="phone" label="手机号">
            </el-table-column>
            <el-table-column label="状态">
                <template v-slot="item">
                    <div>
                        <el-tag type="success" v-if="item.row.status == 1" size="default">启用</el-tag>
                        <el-tag type="danger" size="default" v-else>禁用</el-tag>
                    </div>
                </template>
            </el-table-column>
            <el-table-column label="操作">
                <template v-slot="item">
                    <div>
                        <el-button type="primary" @click="edit(item.row.uid)">编辑</el-button>
                    </div>
                </template>
            </el-table-column>
  </el-table>
    </div>
</template>

<script lang="ts" setup>
import { useStore } from 'vuex';
import { goodsdelete } from '@/request/api';
import { ElMessage, ElMessageBox } from 'element-plus'
import { defineEmits } from 'vue';
let emit = defineEmits(['edit'])


let store = useStore()
let edit = (uid: number) => {
    emit('edit',uid)

}
let get = () =>{
    store.dispatch('member/getMemberListActions')
}
get()

</script>
<style lang="less" scoped>
.tab{
    margin: 20px;
    margin-left: 0;
}
</style>